-
Notifications
You must be signed in to change notification settings - Fork 25.1k
[Blazor] Clarify trimming behavior for custom types #36094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR clarifies the documentation about trimming behavior for custom types in Blazor applications. The changes address the overly strong language of "never trimmed" by adding the important qualifier that custom types can still be trimmed if explicitly opted in by developers.
- Adds clarification that custom types aren't trimmed "unless explicitly opted in"
- Updates two instances of the trimming behavior description for consistency
I don't think it's a significant problem for the sentence because "never trimmed" is followed by "by Blazor," indicating that it's referring to the framework. However, changing it is fine.👍 WRT ...
Would one create a type that's only used during dev/test and not by the published app? Also, we don't cover opting-into trimming in dev assemblies for published apps. Even if we add a remark on it, we need to indicate how it's even done in the first place.
I opened an issue. Let's discuss further on the issue. |
Oh! ... and while we're working on this, there's one little NIT 😈 that we can fix along the way here. The list items in the blockquote are on one line ... • 1:T1, 1:T2 • 2:T2, 2:T2 They should be on two lines ... • 1:T1, 1:T2 That can be achieved by placing two spaces after the "T2" on the first block quote line. Let's do that before we merge any changes here. I think I should also fix the exception in the same way. Two-spaces added to each of the first two lines will fix it. I'll edit this PR later and fix these items directly. No need for you to take action on them. |
It's not just a dev/test scenario. For example, a custom type in a reusable class library (not necessarily a widely used NuGet package, but most dev teams create their own helper libraries used across all their projects).
That would be nice. :-D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @danroth27! I'll make a final edit now to fix that list items problem and get this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hakenr ... I'm going to open a new issue and put some info on <IsTrimmable>
in here, and then I'll cross-link the parenthetical remark that you're adding to the section.
[EDIT by guardrex to add issue]
Fixes #36095
I think saying "never trimmed" is a bit too strong, since you can still enable trimming for your own assemblies and types.
Internal previews